<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModifyForum.ascx.cs" Inherits="forums_controls_administration_ModifyForum" %>
<%@ Register Src="MoveForum.ascx" TagName="MoveForum" TagPrefix="uc2" %>
<%@ Register Src="../forums/ForumListBox.ascx" TagName="ForumListBox" TagPrefix="uc1" %>
<h2>Modify Forum</h2>
<uc1:ForumListBox ID="ddlForums" runat="server"
    RootItemText="(none)"
    OnForumSelected="NewForumSelected"/>
<asp:Panel runat="server" ID="pnlForum" Visible="false" Width="100%">
                <hr />
    <table width="100%">
        <tr>
            <td width="60%">
                    Parent Forum:<br />
                    <uc1:ForumListBox ID="ddlRoot" runat="server" RootItemText="(root)"/>
                <asp:CustomValidator ID="valCircularReference" runat="server" EnableClientScript="False"
                    ErrorMessage="Circular Reference"
                    OnServerValidate="CheckCircularReference" ControlToValidate="txtName" ValidateEmptyText="True" ValidationGroup="ModifyForum"></asp:CustomValidator><p>
                        Forum Name:<br />
                        <asp:TextBox ID="txtName" runat="server" ValidationGroup="AddForum"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="valFolderNameRequired" runat="server" ControlToValidate="txtName"
                            ErrorMessage="This is a required field, asshole." ValidationGroup="ModifyForum" EnableClientScript="False"></asp:RequiredFieldValidator></p>
                    <p>
                        Description:<br />
                        <asp:TextBox ID="txtDescription" runat="server" Columns="60" Rows="4" TextMode="multiLine"></asp:TextBox>
                    </p>
                    <p>
                        Visibility:<br />
                        <asp:DropDownList ID="ddlVisibility" runat="server">
                            <asp:ListItem Value="0">All Users</asp:ListItem>
                            <asp:ListItem Value="1">Registered Users</asp:ListItem>
                            <asp:ListItem Value="2">Moderators</asp:ListItem>
                            <asp:ListItem Value="3">Super Moderators</asp:ListItem>
                            <asp:ListItem Value="4">Administrators</asp:ListItem>
                        </asp:DropDownList>
                    </p>
                    <p>
                        <asp:Button runat="server" ID="btnUpdate"
                            Text="Update" OnClick="btnUpdate_Click" ValidationGroup="ModifyForum" />
                    </p>
            </td>
            <td width="40%">
                Reposition forums:
                <uc2:MoveForum ID="MoveForum1" runat="server"
                    OnForumUpdated="ForumMoved" />
            </td>
        </tr>
    </table>
</asp:Panel>